﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="SilverlightInEnterprise.VisualStateManagerDemo.Controls.WorkflowForm"
    mc:Ignorable="d"
    d:DesignHeight="700" d:DesignWidth="960">
    
	<Grid x:Name="LayoutRoot" Background="White" Margin="6" DataContext="{Binding Source={StaticResource SampleDataSource}}">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="0.33*"/>
			<ColumnDefinition Width="0.33*"/>
			<ColumnDefinition Width="0.33*"/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
			<RowDefinition Height="32"/>
    		
			<RowDefinition Height="Auto" MinHeight="143"/>
    		
		</Grid.RowDefinitions>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="WorkflowStates">
				<VisualState x:Name="DataEntry">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker1">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker2">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="comboBox">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker3">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker4">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox1">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox2">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker5">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker6">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="datePicker7">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Pending_Verification">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox3">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox4">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox5">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox6">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox7">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="textBox8">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Verified_Pending_Agent_Assignment">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="stackPanel">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Agent_Assigned_Pending_Acceptance"/>
				<VisualState x:Name="Agent_Accepted_Signature_Pending"/>
				<VisualState x:Name="Signed"/>
				<VisualState x:Name="Archived"/>
			</VisualStateGroup>
			<VisualStateGroup x:Name="MAttsgroup">
				<VisualState x:Name="VisualState"/>
				<VisualState x:Name="VisualState1"/>
				<VisualState x:Name="VisualState2"/>
				<VisualState x:Name="VisualState3"/>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<StackPanel Margin="12,0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="3">
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Active WorkflowStage"/>
			<TextBlock TextWrapping="Wrap" Text="{Binding WorkflowProgressViewModel.ActiveWorkflowStage}"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Middle Initial:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox3" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Last Name:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox4" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="1">
			<TextBlock TextWrapping="Wrap" Text="First Name:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox5" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="State" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox6" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Width="100" Text="Zip Code"/>
			<TextBox x:Name="textBox7" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="2">
			<TextBlock TextWrapping="Wrap" Text="City" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox8" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Verified Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Verified By:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3">
			<TextBlock TextWrapping="Wrap" Text="Creation Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker1" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="4" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Assigned Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="4" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Agent Ack Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker2" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="4">
			<TextBlock TextWrapping="Wrap" Text="Assigned Agent:" VerticalAlignment="Center" Width="110"/>
			<ComboBox x:Name="comboBox" Margin="4,0,0,0" Width="200" ItemsSource="{Binding Collection}" DisplayMemberPath="Agent_Name"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="5" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Delivery Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="5" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Signature Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker3" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="5">
			<TextBlock TextWrapping="Wrap" Text="Consultation Date:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker4" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="6" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Witness 2:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox1" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="6" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Notary:" VerticalAlignment="Center" Width="110"/>
			<TextBox x:Name="textBox2" TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="6">
			<TextBlock TextWrapping="Wrap" Text="Witness 1:" VerticalAlignment="Center" Width="110"/>
			<TextBox TextWrapping="Wrap" Margin="4,0,0,0" Width="200"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="7" Grid.Column="1">
			<TextBlock TextWrapping="Wrap" Text="Work Finished:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker5" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="7" Grid.Column="2" d:LayoutOverrides="GridBox">
			<TextBlock TextWrapping="Wrap" Text="Archived:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker6" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="7">
			<TextBlock TextWrapping="Wrap" Text="Work Started:" VerticalAlignment="Center" Width="110"/>
			<sdk:DatePicker x:Name="datePicker7" Margin="4,0,0,0"  Width="200" />
		</StackPanel>
		<Grid Grid.Row="8" Grid.ColumnSpan="3">
			<StackPanel x:Name="stackPanel" Visibility="Collapsed" >
				<TextBlock TextWrapping="Wrap" Text="Agent Workload" Margin="0,0,12,0" d:LayoutOverrides="Width"/>
				<ig:XamGrid x:Name="AgentWorkload" ItemsSource="{Binding Collection}">
					<ig:XamGrid.GroupBySettings>
						<ig:GroupBySettings AllowGroupByArea="Top"/>
					</ig:XamGrid.GroupBySettings>
				</ig:XamGrid>
			</StackPanel>
		</Grid>
	</Grid>
</UserControl>
